package com.example.boot2mybatis.mapper;

//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
//import org.springframework.stereotype.Repository;
import com.example.boot2mybatis.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * //@Repository
 *   接口继承 extends BaseMapper<User>
 * // @Mapper
 *
 * 以上两种方式都可以将mapper 注入到spring容器中
 */
//@Mapper
public interface UserMapper  {//extends BaseMapper<User> {
     User login(String name);

     @Select("select * from user_2023 where name=#{name}")
     User loginAn(String name);

     void insert(User u);
}


